package com.leochan.shuniu.api;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

import org.scribe.xauth.Xauth_Scribe;

import android.content.Context;

import com.leochan.shuniu.Global;
import com.leochan.utils.DebugUtils;

public class AuthorizeAPI {
	
	public static void authorize(Context context) throws IOException {
		InputStream open = context.getAssets().open("conf.properties");
		Properties tp = new Properties();
		tp.load(open);
		Global.sb = new Xauth_Scribe(tp);
		Global.token = Global.sb.getAccessToken(Global.proxy);
		DebugUtils.printLogD(Global.token.toString());
	}

}
